home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / rews.arc / REWS.DOC < prev   
Encoding:
Text File  |  1986-06-08  |  2.5 KB  |  55 lines

  1. REWS - an ascii to w* (more-or-less) format converter     Ver. 1.2
  2.  
  3.   Copyright 1986 by H. E. Schaffer  Permission is granted for
  4.   non-commercial copying and distribution.
  5.  
  6.   The primary aim of this program is to ease the use of ascii files
  7. in the normal W* D(ocument) file mode.    It converts certain carriage
  8. returns to soft carriage returns, and optionally converts some
  9. spaces to soft spaces.    This allows w* to reformat such text.  A
  10. carriage return at the end of a non-empty line is changed to a soft
  11. carriage return if it is followed by a non-empty line with a non-space
  12. character in col. 1.  The last of a series of spaces is left as a hard
  13. space with earlier ones optionally (if the -s option is given, and if
  14. the series does not begin a line ) converted to soft spaces (except
  15. for the first space after a period.)  This greatly eases working with
  16. right justified text.  The soft spacing option is not needed if the
  17. file is not right justified, and may not be desireable if there are
  18. formulas and tables embedded in the text.
  19.  
  20.  A blank line will have a hard carriage return.  A line followed by
  21. either a blank line or an indented line will also have a hard carriage
  22. return.  The end character of each word is also tinkered with to get
  23. into a format more suitable for W*.  Embedded tabs are left alone, and
  24. are not fully understood by W*.  If you have trouble with right
  25. justification you may have embedded tabs - they can be found since the
  26. cursor will jump over several (apparent) spaces when moved one column.
  27. Delete the tab, and reformat.
  28.  
  29.             Operation
  30.  
  31. rews [-s] in_file_ascii  out_file_ws
  32.  
  33. The optional -s option causes the conversion to soft spacing.  The
  34. input file is an ascii file.  The output file is the input file
  35. converted to a w* type format.
  36.  
  37.             Technical Discussion
  38.  
  39.   The conversion is done by a state machine with 3 major states.  The
  40. state depends on the previous character read - which can be a newline,
  41. a space, or a "character" (i.e., anything else.)  Spaces are
  42. treated as characters unless the -s option is specified.  The flag
  43. "initial" identifies the beginning of a line.  This flag plus the
  44. contents of a 3 character wide moving window drive all the decisions.
  45. A character followed by white space is converted by setting its 8'th
  46. bit.
  47.  
  48.  
  49.             Disclaimer
  50.  
  51.   The quality of the conversion done by this program is limited by
  52. my degree of understanding of the details of the W* format.  No
  53. warranty of perfection or suitability is made.    Send suggestions and
  54. comments to me a Box 7109, N.C. State Univ., Raleigh, NC  27695.
  55.